package com.gdue.commons;

/**
 *  基于ThreadLocal封装工具类，保存用户id和获取当前登录用户id
 */
public class BaseContext {
    public static ThreadLocal<Long> longThreadLocal=new ThreadLocal<>();

    public static   void    setCurrentId(Long   id){
        longThreadLocal.set(id);
    }

    public static Long getCurreantId(){
        return longThreadLocal.get();
    }
}
